package lesson15homework;

import java.util.Arrays;

public class StudentGroupDemo {

	public static void main(String[] args) 
	{
		StudentGroup group = new StudentGroup("kst");
		StudentGroup group1 = new StudentGroup("someElse");
		
		Student ivan = new Student("Ivan", "KST", 4.5, 1, 19, false, 0);	
		Student peter = new Student("Peter", "KST", 5.00, 3, 21, false, 100);
		Student gogo = new Student("Gogo", "KsT", 4.01, 4, 25, true, 50);
		Student niki = new Student("Niki", "ksT", 5.45, 2, 22, false, 20);
		Student teodor = new Student("Teodor", "someElse", 4.75, 1, 27, false, 1);
		Student jhon = new Student("Jhon", "kSt", 3, 3, 23, false, 200);
		Student joan = new Student("Joan", "ksT", 21);
		
		
		
		group.addStudent(ivan);
		group.addStudent(peter);
		group.addStudent(gogo);
		group.addStudent(niki);
		group.addStudent(teodor);
		group.addStudent(jhon);
		group.addStudent(joan);

		
		group.theBestStudent();
		
		group.printStudentsInGroup(group);
		
		group.emptyGroup();
		
		System.out.println(Arrays.toString(group.students));
		
		
		Student ivan1 = new Student("Ivan", "someElse", 4.5, 1, 19, false, 0);	
		Student peter1 = new Student("Peter", "someElse", 6.00, 3, 21, false, 100);
		Student gogo1 = new Student("Gogo", "KsT", 4.01, 4, 25, true, 50);
		Student niki1 = new Student("Niki", "someElse", 5.45, 2, 22, false, 20);
		Student teodor1 = new Student("Teodor", "someElse", 4.75, 1, 27, false, 1);
		Student jhon1 = new Student("Jhon", "SomEElse", 3.33, 3, 23, false, 200);
		Student joan1 = new Student("Joan", "someElse", 5.55, 2, 23, false, 150);
		
		group1.addStudent(peter1);
		group1.addStudent(gogo1);
		group1.addStudent(niki1);
		group1.addStudent(teodor1);
		group1.addStudent(jhon1);
		group1.addStudent(joan1);
		group1.addStudent(ivan1);
		
		ivan1.receiveScholarship(4.25, 200);
		jhon1.receiveScholarship(4.25, 201);
		peter1.upYear(peter1);
		jhon1.upYear(jhon1);
		jhon1.upYear(jhon1);
		
		group1.theBestStudent();
		group1.printStudentsInGroup(group1);
		
		group1.emptyGroup();
		

		
	}

}
